<template>
  <div class="testa">
    <button @click="getb">传送</button>
  </div>
</template>

<script>
import bus from '@/utils/bus'
export default {
  methods: {
    getb() {
      bus.$emit('tb', Math.random() * 100)
    }
  }
}
</script>

<style>
.testa {
  height: 200px;
  width: 200px;
  background-color: pink;
}
</style>
